package com.banyuan;

import com.banyuan.config.SpringAocConfig;
import com.banyuan.controller.UserController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {

//        ApplicationContext ac = new ClassPathXmlApplicationContext("beans.xml");

        ApplicationContext ac = new AnnotationConfigApplicationContext(SpringAocConfig.class);
        UserController userController = ac.getBean("userController", UserController.class);
        userController.delete(3);
    }
}
